angular.module('app').controller('commonbtnController', ['$scope','i18nService','dialogService','ngNotify','$compile',function($scope,i18nService,dialogService,ngNotify,$compile) {
    var CodeMirror = require('codemirror');

    var editor_btn = CodeMirror.fromTextArea(document.getElementById("codemirror_btn"), {  // 标识到textarea
			//value : "",  // 文本域默认显示的文本
			theme : 'neo',//CSS样式选择
			mode: "cypher",//模式 text/html javascript
			indentUnit : 2,  //缩进单位，默认2
			smartIndent : true,  //是否智能缩进
			tabSize : 4,  //Tab缩进，默认4
			readOnly : true,  //是否只读，默认false
			showCursorWhenSelecting : true,
			lineWrapping: true,
			indentWithTabs: false,
			styleActiveLine: true, //line选择是是否加亮
			matchBrackets: true,
			lineNumbers : true //是否显示行号
    });
    //editor_btn.setValue("CREATE (n:Person { name: 'Dan' }) RETURN n");

}]);